ea=here() 
while ea!=idaapi.BADADDR:
    if "dd offset" in idc.GetDisasm(ea) or  "dq offset" in idc.GetDisasm(ea):
        print "unsigned int (__stdcall **"+ idc.GetDisasm(ea).replace('dd offset ','').replace('dq offset ','').replace('(',')(IUnknownVtbl *this,').replace('::','_').replace('`','').replace(' deleting ','').replace('\'','').strip()+";"
        ea=idc.NextHead(ea)
    else:   
        break  